﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AssetsSys.Model;

namespace AssetsSys.model
{
    /// <summary>
    /// 维修记录表
    /// </summary>
    public class Fixup : BaseEntity
    {
        /// <summary>
        /// 维修资产
        /// </summary>
        [ForeignKey(nameof(Assets))]
        public Guid AssetsId { get; set; }
        public Assets Assets { get; set; }
        /// <summary>
        /// 原状况
        /// </summary>
        [ForeignKey(nameof(OldState))]
        public Guid OldStateId { get; set; }
        public Status OldState { get; set; }
        /// <summary>
        /// 现状况
        /// </summary>
        [ForeignKey(nameof(NewState))]
        public Guid? NewStateId { get; set; }
        public Status NewState { get; set; }
        /// <summary>
        /// 问题描述
        /// </summary>
        public string FixupDescribe { get; set; }
        /// <summary>
        /// 维修状态(0等待，1同意，2拒绝)
        /// </summary>
        public string FixupState { get; set; }
        /// <summary>
        /// 报修人
        /// </summary>
        [ForeignKey(nameof(RepairUsers))]
        public Guid RepairId { get; set; }
        public User RepairUsers { get; set; }
        /// <summary>
        /// 维修人
        /// </summary>
        [ForeignKey(nameof(FixUsers))]
        public Guid? FixId { get; set; }
        public User FixUsers { get; set; }

    }
}
